/*
 * FileName：Vote.java 
 * <p>
 * Copyright (c) 2017-2020 <a href="https://www.smartwx.info">hermit(1154808491@qq.com)</a>.
 * <p>
 * Licensed under the GNU General Public License, Version 3 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/gpl-3.0.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package com.smart.wx.wxcms.entity;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.smart.common.page.Page;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 *
 * @author hermit
 * @version 2.0
 * @date 2018-07-10 23:25:20
 */
@Data
public class Vote extends Page implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	private String id;
	/**
	 * 活动名称
	 */
	private String name;
	/**
	 * 活动海报
	 */
	private String poster;
	/**
	 * 活动简介
	 */
	private String brief;
	/**
	 * 活动规则
	 */
	private String rules;
	/**
	 * 报名开始时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
	private Date signUpStartTime;
	/**
	 * 报名截止时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
	private Date signUpEndTime;
	/**
	 * 投票开始时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
	private Date voteStartTime;
	/**
	 * 投票截止时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
	private Date voteEndTime;

	/**
	 * 
	 */
	private String account;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date createtime = new Date();
	/**
	 * 修改时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
	private Date updatetime = new Date();

	/**
	 * 状态：0未发布 1已发布 2已结束
	 */
	private Integer voteState;

	/**
	 * 备注
	 */
	private String remark;


	/**
	 * 报名人数
	 */
	@Transient
	private int applyCount;

	/**
	 * 投票总数
	 */
	@Transient
	private int voteCount;

	/**
	 * 粉丝参与人数
	 */
	@Transient
	private int fanCount;



	/**
	 * 投票URL
	 */
	@Transient
	private String voteUrl;
	/**
	 * 投票URL[二维码链接]
	 */
	@Transient
	private String voteQRCodeUrl;


	/**
	 * 报名URL
	 */
	@Transient
	private String applyUrl;

	/**
	 * 报名URL[二维码链接]
	 */
	@Transient
	private String applyQRCodeUrl;


	/**
	 * 报名状态：0未开始 1已开始(可以报名) 2已结束
	 */
	@Transient
	private String applyState;


	/**
	 * 当前用户是否已经报名过 0 未报名 1 已报名
	 */
	@Transient
	private String personalApplyState;


}
